#ifndef __INTERFACE_H__
#define __INTERFACE_H__

#include "main.h"
#include "rm_motor.h"
#include "M3508.h"
#include "omni_wheel_cal.h"
#include "mahony.h"

typedef struct
{
	int16_t Vx;
	int16_t Vy;
	int16_t Vw;
	int16_t power_percentage;
}Interface_gimbal_to_chassis;

typedef struct
{
	int16_t I;
	int16_t V;
	int16_t power;
}Interface_power_to_chassis;

typedef struct
{
	int16_t q0;
	int16_t q1;
	int16_t q2;
	int16_t q3;
}Interface_Quaternion_gimbal;

extern Interface_gimbal_to_chassis gimbal_to_chassis;
extern Interface_power_to_chassis power_to_chassis;
extern Interface_Quaternion_gimbal q_to_gimbal;
uint8_t interface_Quaternion_cmd(CAN_HandleTypeDef *hcan,Interface_Quaternion_gimbal* q);
void interface_callback(CAN_RxHeaderTypeDef* rx_header, uint8_t* data);
void Quaternion_gimbal_cal(Interface_Quaternion_gimbal* q,Mahony_TypeDef* m);

#endif